package com.weizhu.swufer.testconsumer;

import com.weizhu.swufer.api.demo.DemoService;
import com.weizhu.swufer.core.client.ReferenceConfig;
import com.weizhu.swufer.core.server.SwuferBootstrap;

public class UnitTest {

    private static SwuferBootstrap bootstrap = SwuferBootstrap.newBuilder().registry("42.193.247.5:2181")
            .buildBootstrap();

    public static void main(String[] args) {
        testProxy();
    }

    public static void testProxy(){
        ReferenceConfig config = ReferenceConfig.ref(DemoService.class);

        DemoService reference = (DemoService) bootstrap.getReference(config);
        String zhangyanyu = reference.hello("zhangyanyu");
        System.out.println(zhangyanyu);
    }
}
